libxc: Make conversion from page count to bytes 32-bit safe
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 26 Mar 2015 18:08:44 +0000 (14:08 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 30 Mar 2015 08:34:46 +0000 (09:34 +0100)
commit985c52cf0c0ee31091b29af012ba86a8d83db420
treeef28c28b6a493b0c04e6a428babad3b50aa27d72
parentdd766684e7c97641bbaf16ee2b0e9add388199b7
libxc: Make conversion from page count to bytes 32-bit safe

Commit ba59e2ce935d ("libxc: allocate memory with vNUMA information for
PV guest") creates default vNUMA layout with a single range containing
all memory. The end of the range is calculated by shifting
dom->total_pages by 12 to the left.

On 32-bit dom0 this may result in losing upper bits since total_pages is
a 32-bit type.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_dom_x86.c